package com.vhall.component.entity.vote.vo.room;

import com.vhall.component.framework.common.annotation.ParamName;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Positive;
import java.io.Serializable;

/**
 * @author longzhen.gong
 * @date 2021/7/6 11:38
 */
@NoArgsConstructor
@Data
public class VotesCreateRoomReqVO implements Serializable {

    private static final long serialVersionUID = -8995659931022348449L;

    @NotNull(message = "vote_id参数异常")
    @ParamName("vote_id")
    @Positive
    private Long voteId;

    @ParamName("il_id")
    private Integer ilId;

    @Length(max = 50, message = "titile 参数异常")
    @NotBlank(message = "titile 参数异常")
    @ParamName("title")
    private String title;

    @Pattern(regexp = "(60|120|300|1800|3600)", message = "limit_time参数异常")
    @ParamName("limit_time")
    @NotBlank(message = "limit_time参数异常")
    private String limitTime;

    @Range(min = 1, max = 10, message = "option_num 参数异常")
    @NotNull(message = "option_num 参数异常")
    @ParamName("option_num")
    private Integer optionNum;

    @NotBlank(message = "extend参数异常")
    private String extend;

    @NotBlank(message = "room_id参数异常")
    @ParamName("room_id")
    private String roomId;

    @ParamName("account_id")
    private Integer accountId;

    private String from;

    private Integer en;

}
